package webserver;

import java.util.HashMap;
import java.util.Map;

public class Consts {
    public static Map<String, String> MIME_TYPES = new HashMap<String, String>();
    public static final String COMPILED_PAGE_EXTENSION = ".j";
    public static final String PATH_TO_QUESTIONS = "./mywww/q.tst";
    public static final String PATH_TO_WEB = "./mywww";
    
    public static final String ADD_NEW_QUESTION = "question";
    public static final String ADD_NEW_CHAPTER = "chapter";

    static {
	String image = "image/";
	MIME_TYPES.put(".gif", image + "gif");
	MIME_TYPES.put(".jpg", image + "jpeg");
	MIME_TYPES.put(".jpeg", image + "jpeg");
	MIME_TYPES.put(".png", image + "png");
	String text = "text/";
	MIME_TYPES.put(COMPILED_PAGE_EXTENSION, text + "html");
	MIME_TYPES.put(".html", text + "html");
	MIME_TYPES.put(".htm", text + "html");
	MIME_TYPES.put(".txt", text + "plain");
	MIME_TYPES.put(".css", text + "css");
	MIME_TYPES.put(".js", text + "javascript");
    }

    public static final String INDEX = "index";
    public static final String PARAM_SSID = "ssid";
}
